{% extends 'web_template/default_two/templates/base.html' %}
{% block keywords %}
{{ tlcms.system.web_name }}-{{ tlcms.system.web_subtitle }},{{ tlcms.system.web_key }}
{% endblock %}
{% block description %}{{ tlcms.system.web_description }}{% endblock %}
{% block content %}
    <div id="main" style="transform: none;">
        <div class="main container" style="transform: none;">
            <!-- mian_top -->
            <div class="mian_top latest_news" id="callboard">
                <div class="tit"><span>最新动态</span></div>
                <ul id="miniNewsRegion">
                    {% for foo in tlcms.roll[:20] %}
                        <li style="margin-top: 0">
                            <a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_black">{{ foo.title }}</a>
                            <span>(2017-12-04)</span>
                        </li>
                    {% endfor %}
                </ul>
                <div class="msearch">
                    <form name="search" method="get" action="{{ url_for('webapp_bp.search') }}" target="_blank">
                        <input type="text" name="keywords" placeholder="输入关键词">
                        <button type="submit" class="submit" value="搜索"><i class="fa fa-search"></i></button>
                    </form>
                </div>
            </div>
            <div class="main_body" style="transform: none;">
                <div class="main_left">
                    <div class="m-slide">
                        <ul class="img">
                            {% for foo in tlcms.lantern[:4] %}
                                <li style="display: none;">
                                    <a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank" title="{{ foo.title }}"><img src="{{ foo.imgUrl }}" alt="{{ foo.title }}">
                                    </a>
                                </li>
                            {% endfor %}
                        </ul>
                        <div id="ifocus_opdiv"></div>
                        <div id="ifocus_tx">
                            <ul>
                                {% for foo in tlcms.lantern[:4] %}
                                    <li style="display: none;"><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank" title="{{ foo.title }}">{{ foo.title }}</a></li>
                                {% endfor %}
                            </ul>
                        </div>
                        <ul class="tab">
                            {% for foo in tlcms.lantern[:4] %}
                                <li style="width: 130px;">
                                    <div class="color{{ loop.index }}">{{ foo.title }}</div>
                                </li>{% endfor %}
                        </ul>
                    </div>
                    <div class="daodu">
                        <div class="md_tit">
                            <span>站长推荐</span>
                        </div>
                        <ul>
                            {% for foo in tlcms.con_rec[:6] %}
                                <li>
                                    <div class="img">
                                        <a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}">
                                            <img src="{{ foo.imgUrl }}" alt="{{ foo.title }}">
                                        </a>
                                    </div>
                                    <div class="imgr">
                                        <h3><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" title="{{ foo.title }}" target="_blank">{{ foo.title }}</a></h3>
                                        <p>{{ foo.description[:32] }}{% if foo.description|length>32 %}...{% endif %}</p>
                                    </div>
                                </li>
                            {% endfor %}
                        </ul>
                    </div>
                    <div class="list">
                        <div class="md_tit"><span>最新文章</span></div>
                        <div class="article">
                            <ul id="infinitescroll">
                                {% for foo in tlcms.topNew.data[:10] %}
                                    <li class="infinitescroll_li">
                                        <div class="img">
                                            <a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" title="{{ foo.title }}">
                                                <div class="bg"></div>
                                                <div class="bg_img"></div>
                                                <img src="{{ foo.imgUrl }}" alt="{{ foo.title }}">
                                                <span>{{ foo.PID }}</span>
                                            </a>
                                        </div>
                                        <div class="text">
                                            <h3><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank">{{ foo.title }}</a></h3>
                                            <p>{{ foo.description[:78] }}{% if foo.description|length>78 %}...{% endif %}</p>
                                            <div class="info">
                                                <span><i class="fa fa-user-circle-o"></i>{{ foo.author }}</span>
                                                <span><i class="fa fa-clock-o"></i>{{ foo.update_time }}</span><span><i
                                                    class="fa fa-eye"></i>阅读：{{ foo.clicks }}</span>
                                            </div>
                                        </div>
                                    </li>
                                {% endfor %}
                            </ul>
                        </div>
                    </div>

                </div>

                <div class="main_right" id="main_right" style="position: relative; overflow: visible; box-sizing: border-box; min-height: 1px;">
                    <div class="theiaStickySidebar" style="padding-top: 0px; padding-bottom: 1px; position: static; transform: none;">
                        <div class="widget widget_jinritoutiao">
                            <div class="md_tit"><span>今日更新</span></div>
                            <div class="side_Menu">
                                {% for foo in tlcms.topNew.data[:5] %}
                                    {% if loop.index==1 %}
                                        <h3 class="h3_{{ loop.index }}"><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank">{{ foo.title }}</a></h3>
                                        <p style="display: block;">{{ foo.description[:68] }}{% if foo.description|length>68 %}...{% endif %}</p>
                                    {% else %}
                                        <h3 class="h3_{{ loop.index }}"><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank">{{ foo.title }}</a></h3>
                                        <p style="display: none;">{{ foo.description[:68] }}{% if foo.description|length>68 %}...{% endif %}</p>
                                    {% endif %}
                                {% endfor %}
                            </div>
                        </div>
                        <div class="widget widget_paihang">
                            <div class="md_tit"><span>排行榜</span></div>
                            <div class="paihang">
                                <ul class="tit">
                                    <li class="active"><a href="javascript:;" data="hot_1">热门文章</a></li>
                                    <li><a href="javascript:;" data="hot_2">随机文章</a></li>
                                </ul>
                                <div id="hot_1" class="ph_list" style="display: block;">
                                    <ul>
                                        {% for foo in tlcms.click_doc[:9] %}
                                            <li><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank">{{ foo.title[:16] }}{% if foo.title|length>16 %}...{% endif %}</a></li>
                                        {% endfor %}
                                    </ul>
                                </div>

                                <div id="hot_2" class="ph_list" style="display: none;">
                                    <ul>
                                        {% for foo in tlcms.ran_doc[:9] %}
                                            <li><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank">{{ foo.title[:16] }}{% if foo.title|length>16 %}...{% endif %}</a></li>
                                        {% endfor %}
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="widget widget_previous">
                            <div class="md_tit"><span>最近发表</span></div>
                            <ul>
                                {% for foo in tlcms.topNew.data[:9] %}
                                    <li><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank">{{ foo.title[:16] }}{% if foo.title|length>16 %}...{% endif %}</a></li>
                                {% endfor %}
                            </ul>
                        </div>

                        <div class="widget widget_tags">
                            <div class="md_tit"><span>标签列表</span></div>
                            <ul>
                                {% for foo in tlcms.tags[:100] %}
                                    <li class="tagbgc5"><a target="_blank" href="{{ url_for('webapp_bp.tag_page',tag=foo.tag_name) }}">{{ foo.tag_name }}</a></li>
                                {% endfor %}
                            </ul>
                        </div>
                        <div class="resize-sensor"
                             style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; z-index: -1; visibility: hidden;">
                            <div class="resize-sensor-expand"
                                 style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;">
                                <div style="position: absolute; left: 0px; top: 0px; transition: all 0s ease 0s; width: 330px; height: 2158px;"></div>
                            </div>
                            <div class="resize-sensor-shrink"
                                 style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;">
                                <div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block links %}
    <div class="homelinks container">
        <div class="linkstitle"><span>友情链接</span><i>IM LINKS</i></div>
        <ul>
            {% for foo in tlcms.blogroll %}
                <li>
                    <a href="{{ foo.link_url }}" target="_blank" title="{{ foo.link_name }}" style="color: {{ foo.link_color }}">
                        {{ foo.link_name }}
                    </a>
                </li>
            {% endfor %}
        </ul>
    </div>
{% endblock %}
